/*
Copyright 2010  Murali Devi (profdevi@gmail.com)

This file is part of ComineGL Project.

ComineGL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

ComineGL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with ComineGL.  If not, see <http://www.gnu.org/licenses/>.

This code uses the irrlicht and irrklang libraries.  Please read
the libraries copyrights at 

	irrlicht library:  http://irrlicht.sourceforge.net
	irrklang library:  http://www.ambiera.com/irrklang

*/



//v1.7 copyright Comine.com 20101030S18
#ifndef MStringArray_h
#define MStringArray_h

/////////////////////////////////////////////////
class MStringArray
	{
	/////////////////////////////////////////////////
	bool mNullStringsAllowed;
	char **mList;
	int mCount;
	int mMaxCapacity;

	/////////////////////////////////////////////////
	void ClearObject(void);
	bool UpdateString(int index,const char *string);
	bool DeleteString(int index);
	bool ResizeArray(int size);
	
	/////////////////////////////////////////////////
	public:
	MStringArray(bool create=false,bool nullstrings=false);
	~MStringArray(void);
	bool Create(bool nullstrings=false);
	bool Destroy(void);
	bool Clear(void);									// Clear all the strings
	int GetCount(void);									// Get Count in Array
	const char *GetString(int index);					// Get String
	bool SetString(int index,const char *string);		// Add string at position
	bool SetString(const char *string);					// Add string to end
	bool Remove(int index);								// Remove string at index
	bool IsMember(const char *string);					// Check if string is a member
	};

#endif // MStringArray_h

